﻿using System;
using GeoAPI.Geometries;
using NetTopologySuite.GeometriesGraph;

namespace NetTopologySuite.Operation.Relate
{
	public class RelateNode : Node
	{
		public RelateNode(Coordinate coord, EdgeEndStar edges) : base(coord, edges)
		{
		}

		public override void ComputeIM(IntersectionMatrix im)
		{
			im.SetAtLeastIfValid(base.Label.GetLocation(0), base.Label.GetLocation(1), Dimension.Point);
		}

		public void UpdateIMFromEdges(IntersectionMatrix im)
		{
			((EdgeEndBundleStar)base.Edges).UpdateIM(im);
		}
	}
}
